#!/usr/bin/perl -w
package clreqd_modules;

use strict;
use cldb;
use Config;

sub truncate_logs {
my %ARGS=@_; # no arguments - here for convention only
my ($fd,$rc,$ld,$ent);

	my $d=$::ENV{TRUECL_LOG};
	if(!opendir($ld,$d)) {
		return "ERROR Unable to open directory '$d'.";
	}
	while($ent=readdir($ld)) {
		next if ! -f "$d/$ent";
		next if $ent =~ /\.(gz|Z|bz2)$/;
		open($fd,">$d/$ent");close($fd);
	}
	closedir($ld);
	return "OK";
}

1;
